package com.example.experiment2;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;

import java.util.List;

public class ExamTypesActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_exam_types);

        ExamTypes examTypes = new ExamTypes();
        List<ExamTypes.ExamType> examTypeList = examTypes.getExamTypeList();

        RecyclerView recyclerView = findViewById(R.id.types_recycler_view);
        LinearLayoutManager layoutManager = new LinearLayoutManager(this);
//        layoutManager.setOrientation(LinearLayoutManager.HORIZONTAL);
        layoutManager.setOrientation(LinearLayoutManager.VERTICAL);

        //GridLayoutManager layoutManager = new GridLayoutManager(this, 4);
        recyclerView.setLayoutManager(layoutManager);
        ExamTypesAdapter adapter = new ExamTypesAdapter(examTypeList,
                ExamTypesActivity.this);
        recyclerView.setAdapter(adapter);
    }
}
